﻿using System;

namespace GameEngine
{
    public class Animation
    {

        //------------------- Getters & Setters

        // Total frames in the animation
        public int totalFrames
        {
            get { return total_frames; }
        }
        int total_frames;

        // On the sheet how many columns in do you want to start on
        public int OffsetX
        {
            get { return offset_x; }
        }
        int offset_x;

        // On the sheet how many rows down do yo uwant to start on
        public int OffsetY
        {
            get { return offset_y; }
        }
        int offset_y;

        // If we stop animating which frame do you want to stop on
        public int StopFrame
        {
            get { return stop_frame; }
        }
        int stop_frame;

        //------------------- Constructs

        public Animation(int total_frames, int offset_x = 0, int offset_y = 0, int stop_frame = -1)
        {
            this.total_frames = total_frames;

            if (offset_x != 0)
                this.offset_x = offset_x;
            if (offset_y != 0)
                this.offset_y = offset_y;

            this.stop_frame = stop_frame;
        }
    }
}
